package zhuoer.adv1;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;

public class FileRead3 {
	// 处理字符文件的
	public static void main(String[] args) {
		try {
			FileReader fr = new FileReader("e:/a/b/Birthday1.java");
			// int c = 0;
			// while ((c = fr.read()) > 0) {
			// System.out.print((char) c);
			// }
			char cr[] = new char[20];
			int len = 0;
			while ((len = fr.read(cr)) > 0) {
				System.out.println(new String(cr, 0, len));
			}
			fr.close();
		} catch (Exception e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}

	}

}
